package com.code.AZPlan.model.po;

import com.code.commons.model.po.BasePO;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户提币订单PO
 *
 * @author tangyifei
 */
@ApiModel("用户提币订单PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class WithdrawOrder extends BasePO<String> {

    private static final long serialVersionUID = 4626757230942072768L;

    @ApiModelProperty(value = "主键", example = "1")
    @Id
    @Length(min = 1, max = 64)
    private String id;

    @ApiModelProperty(value = "用户主键", example = "1")
    @NotBlank(message = "用户主键不能为空")
    @Length(min = 1, max = 64)
    private String userId;

    @ApiModelProperty(value = "用户账号", example = "XXXXXX")
    private String userAccount;

    @ApiModelProperty(value = "币种类型", example = "XWC")
    @NotBlank(message = "币种类型不能为空")
    private String coinType;

    @ApiModelProperty(value = "转入地址（提币目的地址）", example = "XWCNQK1XybmJSkFbeNBAWWidPQaM87igWzZyU")
    @NotBlank(message = "转入地址（提币目的地址）不能为空")
    private String toAddr;

    @ApiModelProperty(value = "提币金额", example = "2000XWC")
    @NotNull(message = "提币金额不能为空")
    private BigDecimal amount;

    @ApiModelProperty(value = "提币手续费", example = "20XWC")
    @NotNull(message = "提币手续费不能为空")
    private BigDecimal fee;

    @ApiModelProperty(value = "审核状态 0未审核 1审核中 2审核成功 3审核失败", example = "1")
    private Integer checkState;

    @ApiModelProperty(value = "审核时间", example = "1")
    private Date checkTime;

    @ApiModelProperty(value = "交易密码", example = "111111")
    @NotBlank(message = "交易密码不能为空")
    private String tranPwd;

    @ApiModelProperty(value = "验证码", example = "111111")
    @NotBlank(message = "验证码不能为空")
    private String authCode;

    @ApiModelProperty(value = "手机号", example = "150****0055")
    @NotBlank(message = "手机号不能为空")
    private String phone;

    @ApiModelProperty(value = "手机钱包的账户版本号", example = "1")
    @NotNull(message = "手机钱包的账户版本号不能为空")
    private Integer userCoinBalanceVersion;

    @ApiModelProperty(value = "当前页", example = "1")
    private Integer page;

    @ApiModelProperty(value = "每页的大小", example = "1")
    private Integer pageSize;

}
